package com.java113.spring.demo.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping ("/user2")
public class UserController2 {
    @RequestMapping("/m1")//资源路径：类路径+方法路径
    public String m1() {
        return "hello user!";
    }
    @RequestMapping(value = "/m2",method = RequestMethod.GET)
    public String m2() {
        return "m2";
    }
    @RequestMapping(value = "/m3",method = RequestMethod.POST)
    public String m3() {
        return "m3";
    }
}
